package org.marsdonne.auth;

import org.marsdonne.archives.OrganizationType;
import org.marsdonne.archives.Platform;

import java.util.Optional;

public interface AggregateUser {

    /**
     * 平台绑定
     * @param platform
     * @param platformId
     * @param phoneNumber
     * @param invoiceTitle
     */
    PlatformUser bind(EndPointUser user, Platform platform, String platformId, String phoneNumber, String invoiceTitle);

    /**
     * 绑定机构
     * @param realName
     * @param residentId
     * @param organizationType
     * @param organizationId
     * @param organizationLicenseCode
     * @param organizationName
     * @return
     */
    Optional<UnionUser> bind(String realName, String residentId, OrganizationType organizationType, Long organizationId, String organizationLicenseCode, String organizationName);

    /**
     * 解绑机构
     * @param residentId
     * @param licenseCode
     * @return
     */
    Optional<UnionUser> unbind(String residentId, String licenseCode);

    /**
     * 实名认证
     */
    UnionUser certifyUser(EndPointUser user, String residentId, String realName);
}
